{include file="public/header" /}





<div class="page">
    <form method="post" id='form1'>
            <table class="ds-default-table">
                <tbody>
                    <tr class="noborder"> 
                        <td class="required w120">商品名称</td>
                        <td>{$refund.goods_name}</td>
                    </tr>
                    <tr class="noborder">
                        <td class="required w120">{$Think.lang.refund_order_refund}</td>
                        <td><input type="text" name="refund_amount" id="refund_amount" value="{:ds_price_format($refund['refund_amount'])}"></td>
                        <td class="vatop tips"></td>
                    </tr>

                    <tr class="noborder"> 
                        <td class="required w120">{$Think.lang.refund_buyer_message}</td>
                        <td class="vatop rowform">{$refund.buyer_message}</td>
			<td class="vatop tips"></td>
                    </tr>

                    <tr class="noborder"> 
                        <td class="required w120">{$Think.lang.refund_image_upload}</td>
                        <td class="vatop rowform" style="width: 800px;">
                            {notempty name="apply_images"}
                            {foreach name="apply_images" item="val" key="key" }
                                <img  style="width: 150px;height: 130px;" src="{$val}">
                            {/foreach}
                            {/notempty}
                        </td>
                        <td class="vatop tips"></td>
                    </tr>
                    
                    <tr class="noborder"> 
                        <td class="required w120">{$Think.lang.refund_seller_message}</td>
                        <td class="vatop rowform">{$refund.seller_message}</td>
			<td class="vatop tips"></td>
                    </tr>
                    <tr class="noborder"> 
                        <td class="required w120">{$Think.lang.refund_message}</td>
                        <td class="vatop rowform"><textarea id="admin_message" name="admin_message" class="tarea"></textarea></td>
			<td class="vatop tips"></td>
                    </tr>
                </tbody>
                <tfoot>
                    <tr class="tfoot">
                        <td></td>
                        <td colspan="15"><input style="line-height: 10px;" class="btn" type='submit' name="{$Think.lang.ds_confirm_submit}"/></td>
                    </tr>					
                </tfoot>
            </table>
    </form>
</div>

<link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/css/lightbox.min.css">
<script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/js/lightbox.min.js"></script>
<script type="text/javascript">
    $(function() {
        $('#form1').validate({
            errorPlacement: function(error, element) {
                //error.appendTo(element.parent().parent().find('td:last'));
                error.appendTo(element.parent().parent().parent().prev().find('td:last'));
            },
            rules: {
                admin_message: {
                    required: true
                },
                refund_amount: {
                    number: true,
                    required: true,
                    min:0
                }
            },
            messages: {
                admin_message: {
                    required   : '{$Think.lang.refund_message_null}'
                },
                refund_amount: {
                    required   : '请设置正确的退款金额',
                    number   : '请设置正确的退款金额',
                    min   : '请设置正确的退款金额',
                },
            }
        });
    });
</script>